package com.shine.app.ui;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.TextView;

import com.shine.app.AppManager;
import com.shine.app.BaseActivity;
import com.shine.app.R;
import com.shine.app.inject.InjectView;
import com.shine.app.inject.Injector;

public class ToastDialogActivity extends BaseActivity {

	@InjectView(R.id.submit)
	private TextView submiTextView;
	@InjectView(R.id.message)
	private TextView messageTextView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.setContentView(R.layout.dialog_toast);
		Injector.get(this).inject();
		String message = getIntent().getStringExtra("title");
		String hit = getIntent().getStringExtra("button");
		submiTextView.setText(hit);
		messageTextView.setText(message);
		submiTextView.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				AppManager.getAppManager().finishActivity();
			}
		});
	}

}
